3.2399 \(\int \frac {(5-x) (3+2 x)^2}{(2+5 x+3 x^2)^3} \, dx\)

Optimal. Leaf size=57 \[ -\frac {587 x+533}{18 \left (3 x^2+5 x+2\right )^2}+\frac {9918 x+8269}{18 \left (3 x^2+5 x+2\right )}-551 \log (x+1)+551 \log (3 x+2) \]

[Out]

1/18*(-533-587*x)/(3*x^2+5*x+2)^2+1/18*(8269+9918*x)/(3*x^2+5*x+2)-551*ln(1+x)+551*ln(2+3*x)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {816, 1660, 638, 616, 31} \[ -\frac {587 x+533}{18 \left (3 x^2+5 x+2\right )^2}+\frac {9918 x+8269}{18 \left (3 x^2+5 x+2\right )}-551 \log (x+1)+551 \log (3 x+2) \]

Antiderivative was successfully verified.

[In]

Int[((5 - x)*(3 + 2*x)^2)/(2 + 5*x + 3*x^2)^3,x]

[Out]

-(533 + 587*x)/(18*(2 + 5*x + 3*x^2)^2) + (8269 + 9918*x)/(18*(2 + 5*x + 3*x^2)) - 551*Log[1 + x] + 551*Log[2
+ 3*x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 616

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 638

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b*d - 2*a*e + (2*c*d -
b*e)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c)), x] - Dist[((2*p + 3)*(2*c*d - b*e))/((p + 1)*(b^2
- 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^
2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2]

Rule 816

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Int[(a
 + b*x + c*x^2)^p*ExpandIntegrand[(d + e*x)^m*(f + g*x), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2
- 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && ILtQ[p, -1] && IGtQ[m, 0] && RationalQ[a, b, c, d, e, f, g]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rubi steps

\begin {align*} \int \frac {(5-x) (3+2 x)^2}{\left (2+5 x+3 x^2\right )^3} \, dx &=\int \frac {45+51 x+8 x^2-4 x^3}{\left (2+5 x+3 x^2\right )^3} \, dx\\ &=-\frac {533+587 x}{18 \left (2+5 x+3 x^2\right )^2}-\frac {1}{2} \int \frac {\frac {1673}{9}+\frac {8 x}{3}}{\left (2+5 x+3 x^2\right )^2} \, dx\\ &=-\frac {533+587 x}{18 \left (2+5 x+3 x^2\right )^2}+\frac {8269+9918 x}{18 \left (2+5 x+3 x^2\right )}+551 \int \frac {1}{2+5 x+3 x^2} \, dx\\ &=-\frac {533+587 x}{18 \left (2+5 x+3 x^2\right )^2}+\frac {8269+9918 x}{18 \left (2+5 x+3 x^2\right )}+1653 \int \frac {1}{2+3 x} \, dx-1653 \int \frac {1}{3+3 x} \, dx\\ &=-\frac {533+587 x}{18 \left (2+5 x+3 x^2\right )^2}+\frac {8269+9918 x}{18 \left (2+5 x+3 x^2\right )}-551 \log (1+x)+551 \log (2+3 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 56, normalized size = 0.98 \[ -\frac {587 x+533}{18 \left (3 x^2+5 x+2\right )^2}+\frac {9918 x+8269}{54 x^2+90 x+36}+551 \log (-6 x-4)-551 \log (-2 (x+1)) \]

Antiderivative was successfully verified.

[In]

Integrate[((5 - x)*(3 + 2*x)^2)/(2 + 5*x + 3*x^2)^3,x]

[Out]

-1/18*(533 + 587*x)/(2 + 5*x + 3*x^2)^2 + (8269 + 9918*x)/(36 + 90*x + 54*x^2) + 551*Log[-4 - 6*x] - 551*Log[-
2*(1 + x)]

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 93, normalized size = 1.63 \[ \frac {9918 \, x^{3} + 24799 \, x^{2} + 3306 \, {\left (9 \, x^{4} + 30 \, x^{3} + 37 \, x^{2} + 20 \, x + 4\right )} \log \left (3 \, x + 2\right ) - 3306 \, {\left (9 \, x^{4} + 30 \, x^{3} + 37 \, x^{2} + 20 \, x + 4\right )} \log \left (x + 1\right ) + 20198 \, x + 5335}{6 \, {\left (9 \, x^{4} + 30 \, x^{3} + 37 \, x^{2} + 20 \, x + 4\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)^2/(3*x^2+5*x+2)^3,x, algorithm="fricas")

[Out]

1/6*(9918*x^3 + 24799*x^2 + 3306*(9*x^4 + 30*x^3 + 37*x^2 + 20*x + 4)*log(3*x + 2) - 3306*(9*x^4 + 30*x^3 + 37
*x^2 + 20*x + 4)*log(x + 1) + 20198*x + 5335)/(9*x^4 + 30*x^3 + 37*x^2 + 20*x + 4)

________________________________________________________________________________________

giac [A]  time = 0.16, size = 46, normalized size = 0.81 \[ \frac {9918 \, x^{3} + 24799 \, x^{2} + 20198 \, x + 5335}{6 \, {\left (3 \, x^{2} + 5 \, x + 2\right )}^{2}} + 551 \, \log \left ({\left | 3 \, x + 2 \right |}\right ) - 551 \, \log \left ({\left | x + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)^2/(3*x^2+5*x+2)^3,x, algorithm="giac")

[Out]

1/6*(9918*x^3 + 24799*x^2 + 20198*x + 5335)/(3*x^2 + 5*x + 2)^2 + 551*log(abs(3*x + 2)) - 551*log(abs(x + 1))

________________________________________________________________________________________

maple [A]  time = 0.05, size = 48, normalized size = 0.84 \[ 551 \ln \left (3 x +2\right )-551 \ln \left (x +1\right )-\frac {425}{6 \left (3 x +2\right )^{2}}+\frac {320}{3 x +2}+\frac {3}{\left (x +1\right )^{2}}+\frac {77}{x +1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5-x)*(2*x+3)^2/(3*x^2+5*x+2)^3,x)

[Out]

-425/6/(3*x+2)^2+320/(3*x+2)+551*ln(3*x+2)+3/(x+1)^2+77/(x+1)-551*ln(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 54, normalized size = 0.95 \[ \frac {9918 \, x^{3} + 24799 \, x^{2} + 20198 \, x + 5335}{6 \, {\left (9 \, x^{4} + 30 \, x^{3} + 37 \, x^{2} + 20 \, x + 4\right )}} + 551 \, \log \left (3 \, x + 2\right ) - 551 \, \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)^2/(3*x^2+5*x+2)^3,x, algorithm="maxima")

[Out]

1/6*(9918*x^3 + 24799*x^2 + 20198*x + 5335)/(9*x^4 + 30*x^3 + 37*x^2 + 20*x + 4) + 551*log(3*x + 2) - 551*log(
x + 1)

________________________________________________________________________________________

mupad [B]  time = 2.84, size = 45, normalized size = 0.79 \[ \frac {\frac {551\,x^3}{3}+\frac {24799\,x^2}{54}+\frac {10099\,x}{27}+\frac {5335}{54}}{x^4+\frac {10\,x^3}{3}+\frac {37\,x^2}{9}+\frac {20\,x}{9}+\frac {4}{9}}-1102\,\mathrm {atanh}\left (6\,x+5\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-((2*x + 3)^2*(x - 5))/(5*x + 3*x^2 + 2)^3,x)

[Out]

((10099*x)/27 + (24799*x^2)/54 + (551*x^3)/3 + 5335/54)/((20*x)/9 + (37*x^2)/9 + (10*x^3)/3 + x^4 + 4/9) - 110
2*atanh(6*x + 5)

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 51, normalized size = 0.89 \[ - \frac {- 9918 x^{3} - 24799 x^{2} - 20198 x - 5335}{54 x^{4} + 180 x^{3} + 222 x^{2} + 120 x + 24} + 551 \log {\left (x + \frac {2}{3} \right )} - 551 \log {\left (x + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5-x)*(3+2*x)**2/(3*x**2+5*x+2)**3,x)

[Out]

-(-9918*x**3 - 24799*x**2 - 20198*x - 5335)/(54*x**4 + 180*x**3 + 222*x**2 + 120*x + 24) + 551*log(x + 2/3) -
551*log(x + 1)

________________________________________________________________________________________